package cartaPokerTest;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import cartaPoker.CartaPoker;

public class CartaPokerTest {

	CartaPoker cartaPokerTest1;
	CartaPoker cartaPokerTest2;

	@Before
	public void setUp() throws Exception {

	}

	@After
	public void tearDown() throws Exception {

	}

	@Test
	public void siLaPrimeraCartaEsMayorAlaSegundaEntoncesElMetodoEsMayorDaTrue() {
		cartaPokerTest1 = new CartaPoker("D", "A");
		cartaPokerTest2 = new CartaPoker("P", "K");

		assertTrue("la Carta no es mayor que la segunda",
				cartaPokerTest1.esMayor(cartaPokerTest2));
		assertTrue(cartaPokerTest1.valor() > cartaPokerTest2.valor());
	}

	@Test
	public void siLaPrimeraCartaEsMenorALaSegundaEncontesElMetodoEsMayorDaFalse() {
		cartaPokerTest1 = new CartaPoker("D", "2");
		cartaPokerTest2 = new CartaPoker("P", "Q");

		assertFalse("la Carta no es mayor que la segunda",
				cartaPokerTest1.esMayor(cartaPokerTest2));
		assertFalse(cartaPokerTest1.valor() > cartaPokerTest2.valor());

	}

}
